<?php
session_start();
include_once('./src/BD.php');
$bd = new BD;
$idusu = $bd->do_login($_GET['login'],$_GET['pass']) ;
print_r($idusu);
if ($idusu['id'] && $idusu['nombre'])
{
	print_r($idusu);
	$_SESSION['userid'] = $idusu['id'];
	$_SESSION['user'] = $idusu['nombre'];
	header ("Location: index.php");
}
else
	header ("Location: index.php?error=true");
?>
